package com.example.demo.mapper;

import com.example.demo.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;


@Mapper
public interface UserMapper {
    @Insert("insert into user(id,name,password,time)values(#{id},#{name},#{password},#{time})")
    public int insertUser(User user);
    @Select("select * from user where id=#{id}")
    public List<User> getAll(int id);
    @Delete(" delete from user where id=#{id};")
    public int delete(int id);
    @Update("update user set name=#{name} where id=#{id}")
    public int update(int id,String name);
}
